import java.util.LinkedList;
import java.util.Queue;

public class Test {
    public static void main(String[] args) {
        LinkedList<Integer> linkedList1 = new LinkedList<>();

        Queue<Integer> linkedList2 = new LinkedList<>();

        linkedList2.offer(1);

        System.out.println( linkedList2.poll());
    }
    public int[] arr;
    public int front;
    public int rear;
    public int size;

    public MyCircularQueue(int k) {
        arr = new int[k];
    }

    public boolean enQueue(int value) {
        if(isFull()) {
            return false;
        }
        arr[rear] = value;
        rear = (rear + 1) % arr.length;
        size++;
        return true;
    }

    public boolean deQueue() {
        if(isEmpty()) {
            return false;
        }
        front = (front + 1) % arr.length;
        size--;
        return true;
    }

    public int Front() {
        if(isEmpty()) {
            return -1;
        }
        return arr[front];
    }

    public int Rear() {
        if(isEmpty()) {
            return -1;
        }
        int index= rear == 0 ? arr.length - 1:rear - 1;
        return arr[index];
    }

    public boolean isEmpty() {
        return size == 0;
    }

    public boolean isFull() {
        return size == arr.length;
    }
    public int[] arr;
    public int front;
    public int rear;
    public int size;

    public MyCircularQueue(int k) {
        arr = new int[k];
    }

    public boolean enQueue(int value) {
        if(isFull()) {
            return false;
        }
        arr[rear] = value;
        rear = (rear + 1) % arr.length;
        size++;
        return true;
    }

    public boolean deQueue() {
        if(isEmpty()) {
            return false;
        }
        front = (front + 1) % arr.length;
        size--;
        return true;
    }

    public int Front() {
        if(isEmpty()) {
            return -1;
        }
        return arr[front];
    }

    public int Rear() {
        if(isEmpty()) {
            return -1;
        }
        int index= rear == 0 ? arr.length - 1:rear - 1;
        return arr[index];
    }

    public boolean isEmpty() {
        return size == 0;
    }

    public boolean isFull() {
        return size == arr.length;
    }
    public int[] arr;
    public int front;
    public int rear;
    public int size;

    public MyCircularQueue(int k) {
        arr = new int[k];
    }

    public boolean enQueue(int value) {
        if(isFull()) {
            return false;
        }
        arr[rear] = value;
        rear = (rear + 1) % arr.length;
        size++;
        return true;
    }

    public boolean deQueue() {
        if(isEmpty()) {
            return false;
        }
        front = (front + 1) % arr.length;
        size--;
        return true;
    }

    public int Front() {
        if(isEmpty()) {
            return -1;
        }
        return arr[front];
    }

    public int Rear() {
        if(isEmpty()) {
            return -1;
        }
        int index= rear == 0 ? arr.length - 1:rear - 1;
        return arr[index];
    }

    public boolean isEmpty() {
        return size == 0;
    }

    public boolean isFull() {
        return size == arr.length;
    }
}
